package com.lihao.controller;

import com.github.pagehelper.PageInfo;
import com.lihao.param.PageParam;
import com.lihao.result.ItemResult;
import com.lihao.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("item")
public class ItemController {

    @Autowired
    private ItemService itemService;

    @PostMapping("page")
    public PageInfo<ItemResult> page(@RequestBody PageParam param)
    {
        return itemService.page(param);
    }

    /**
     * 只查询相关列 接口测试
     * @param param
     * @return
     */
    @PostMapping("page2")
    public PageInfo<ItemResult> page2(@RequestBody PageParam param)
    {
        return itemService.page2(param);
    }

}
